<extend name="./public/frame.html"/>
<block name="content">
    <style>
        .layui-form-label{width: 12%;}
        .layui-input-block{margin-left: 12%;}
    </style>
    <form class="layui-form layui-form-pane1" method="post" enctype="multipart/form-data">
        <table class="layui-table">
            <tr>
                <td colspan="2" style="font-weight: bold;color: black;">营运城市</td>
            </tr>
            <tr>
                <td style="width: 13%;text-align: center;">所属区域</td>
                <td>
                    <?php echo $info['province_name'];?>&nbsp;-&nbsp;<?php echo $info['city_name'];?>
                </td>
            </tr>
            <tr>
                <td style="text-align: center;">城市首字母</td>
                <td><input type="text" name="first_name" id="first_name" value="<?php echo $info['first_name'];?>" lay-verify="required" placeholder="请输入城市首字母(必须大写) 例如：H" class="layui-input" style="width: 880px;border: 0;" disabled></td>
            </tr>
            <tr>
                <td style="text-align: center;">平台手续费(%)</td>
                <td><input type="text" name="plate_fee" id="plate_fee" value="<?php echo $info['plate_fee'];?>" lay-verify="required" class="layui-input" style="width: 880px;border: 0;" disabled></td>
            </tr>
            <tr>
                <td style="text-align: center;">是否开启 - 取消订单扣费规则</td>
                <td>
                    <input type="checkbox" data-type="certificate" lay-skin="switch" lay-filter="switchCheck" class="check" lay-text="开启|关闭" value="<?php echo $info['is_cancel'];?>" name="is_cancel" <?php if($info['is_cancel'] == 1):?>checked<?php endif;?> disabled>
                </td>
            </tr>
            <tr class="cancelOrder" <?php if($info['is_cancel'] == 0):?>style="display: none;"<?php endif?>>
                <td colspan="2">
                    <table class="layui-table">
                        <tr>
                            <td colspan="6" style="font-weight: bold;color: black;">取消订单扣费规则</td>
                        </tr>
                        <tr>
                            <td style="text-align: center;">有责取消费用（低 - 元）</td>
                            <td style="text-align: center;">有责取消费用（高 - 元）</td>
                            <td style="text-align: center;">司机出发时长（minute）</td>
                            <td style="text-align: center;">司机到达时长（minute）</td>
                            <td style="text-align: center;">预约时间剩余时长（minute）</td>
                        </tr>
                        <tr>
                            <td style="text-align: center;"><?php echo $info['low_fee']/100;?></td>
                            <td style="text-align: center;"><?php echo $info['high_fee']/100;?></td>
                            <td style="text-align: center;"><?php echo $info['leave_time']/60;?></td>
                            <td style="text-align: center;"><?php echo $info['arrive_time']/60;?></td>
                            <td style="text-align: center;"><?php echo $info['book_remain_time']/60;?></td>
                        </tr>
                        <!--<tr>
                            <td colspan="2" style="font-weight: bold;color: black;">取消订单扣费规则 - 实时订单</td>
                        </tr>
                        <tr>
                            <td>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;padding-left: 100px;">司机出发去接乘客</span>
                                <input type="text" name="real_cancel_time" id="real_cancel_time" placeholder="时间(分钟)"  value="<?php echo $info['real_cancel_time']/60;?>" class="layui-input" style="width: 100px;float: left;margin-right: 10px;" disabled>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">分钟</span>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">有责取消费用</span>
                                <input type="text" name="real_cancel_fee" id="real_cancel_fee" placeholder="费用(元)"  value="<?php echo $info['real_cancel_fee']/100;?>" class="layui-input" style="width: 100px;float: left;margin-right: 10px;" disabled>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">元</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;padding-left: 100px;">司机到达乘客起点</span>
                                <input type="text" name="real_arrive_time" id="real_arrive_time" placeholder="时间(分钟)" value="<?php echo $info['real_arrive_time']/60;?>" class="layui-input" style="width: 100px;float: left;margin-right: 10px;" disabled>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">分钟</span>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">有责取消费用</span>
                                <input type="text" name="real_arrive_fee" id="real_arrive_fee" placeholder="费用(元)" value="<?php echo $info['real_arrive_fee']/100;?>" class="layui-input" style="width: 100px;float: left;margin-right: 10px;" disabled>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">元</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="font-weight: bold;color: black;">取消订单扣费规则 - 预约订单</td>
                        </tr>
                        <tr>
                            <td>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;padding-left: 100px;">司机出发去接乘客</span>
                                <input type="text" name="book_cancel_time" id="book_cancel_time" placeholder="时间(分钟)" value="<?php echo $info['book_cancel_time']/60;?>" class="layui-input" style="width: 100px;float: left;margin-right: 10px;" disabled>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">分钟</span>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">有责取消费用</span>
                                <input type="text" name="book_cancel_fee" id="book_cancel_fee" placeholder="费用(元)" value="<?php echo $info['book_cancel_fee']/100;?>" class="layui-input" style="width: 100px;float: left;margin-right: 10px;" disabled>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">元</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;padding-left: 72px;">距离预约出发时间不足</span>
                                <input type="text" name="book_start_time" id="book_start_time" placeholder="时间(分钟)" value="<?php echo $info['book_start_time']/60;?>" class="layui-input" style="width: 100px;float: left;margin-right: 10px;" disabled>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">分钟</span>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">有责取消费用</span>
                                <input type="text" name="book_start_fee" id="book_start_fee" placeholder="费用(元)" value="<?php echo $info['book_start_fee']/100;?>" class="layui-input" style="width: 100px;float: left;margin-right: 10px;" disabled>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">元</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;padding-left: 100px;">司机到达乘客起点</span>
                                <input type="text" name="book_arrive_time" id="book_arrive_time" placeholder="时间(分钟)" value="<?php echo $info['book_arrive_time']/60;?>" class="layui-input" style="width: 100px;float: left;margin-right: 10px;" disabled>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">分钟</span>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">有责取消费用</span>
                                <input type="text" name="book_arrive_fee" id="book_arrive_fee" placeholder="费用(元)" value="<?php echo $info['book_arrive_fee']/100;?>" class="layui-input" style="width: 100px;float: left;margin-right: 10px;" disabled>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">元</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;padding-left: 100px;">超过预约出发时间</span>
                                <input type="text" name="book_over_time" id="book_over_time" placeholder="时间(分钟)" value="<?php echo $info['book_over_time']/60;?>" class="layui-input" style="width: 100px;float: left;margin-right: 10px;" disabled>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">分钟</span>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">有责取消费用</span>
                                <input type="text" name="book_over_fee" id="book_over_fee" placeholder="费用(元)" value="<?php echo $info['book_over_fee']/100;?>" class="layui-input" style="width: 100px;float: left;margin-right: 10px;" disabled>
                                <span style="display: block;margin-top: 8px;float: left;margin-right: 10px;">元</span>
                            </td>
                        </tr>-->
                    </table>
                </td>
            </tr>
            <tr>
                <td style="text-align: center;">是否开启 - 计价规则</td>
                <td>
                    <input type="checkbox" data-type="certificate" lay-skin="switch" lay-filter="switchSuburbCheck" class="valuation" lay-text="开启|关闭" value="<?php echo $info['is_valuation'];?>" name="is_valuation" <?php if($info['is_valuation'] == 1):?>checked<?php endif;?> disabled>
                </td>
            </tr>
            <tr class="suburbPriceTemplet" <?php if($info['is_valuation'] == 0):?>style="display: none;"<?php endif?>>
                <td colspan="2">
                    <table class="layui-table">
                        <tr>
                            <td colspan="8" style="font-weight: bold;color: black;">普通时段计价规则配置</td>
                        </tr>
                        <tr>
                            <td style="text-align: center;">起步里程(KM)</td>
                            <td style="text-align: center;">起步价(元)</td>
                            <td style="text-align: center;">里程费(元/KM)</td>
                            <td style="text-align: center;">起步时长(分)</td>
                            <td style="text-align: center;">时长费(元/分)</td>
                            <td style="text-align: center;">免费等待时长(分)</td>
                            <td style="text-align: center;">超时等待费(元/分)</td>
                            <td style="text-align: center;">超时等待费上限(元)</td>
                        </tr>
                        <tr>
                            <td style="text-align: center;"><?php echo $info['start_mileage']/1000;?></td>
                            <td style="text-align: center;"><?php echo $info['start_fee']/100;?></td>
                            <td style="text-align: center;"><?php echo $info['mileage_fee']/100;?></td>
                            <td style="text-align: center;"><?php echo $info['start_time']/60;?></td>
                            <td style="text-align: center;"><?php echo $info['time_fee']/100;?></td>
                            <td style="text-align: center;"><?php echo $info['free_wait_time']/60;?></td>
                            <td style="text-align: center;"><?php echo $info['over_wait_fee']/100;?></td>
                            <td style="text-align: center;"><?php echo $info['over_wait_fee_max']/100;?></td>
                        </tr>
                        <tr>
                            <td colspan="8" style="font-weight: bold;color: black;">特殊时段计价规则配置</td>
                        </tr>
                        <tr>
                            <td colspan="8">
                                <table class="layui-table ruleTimeFee">
                                    <tr>
                                        <td style="text-align: center;">时段名称</td>
                                        <td style="text-align: center;">起始时间</td>
                                        <td style="text-align: center;">终止时间</td>
                                        <td style="text-align: center;">起步价(元)</td>
                                        <td style="text-align: center;">里程费(元/KM)</td>
                                        <td style="text-align: center;">时长费(元/分)</td>
                                        <td style="text-align: center;">超时等待费(元/分)</td>
                                    </tr>
                                    <?php if(!empty($priceList)):?>
                                    <?php foreach($priceList as $key=>$value):?>
                                    <tr>
                                        <td style="text-align: center;"><?php echo $value['name'];?></td>
                                        <td style="text-align: center;"><?php echo $value['start_time'];?></td>
                                        <td style="text-align: center;"><?php echo $value['end_time'];?></td>
                                        <td style="text-align: center;"><?php echo $value['start_price']/100;?></td>
                                        <td style="text-align: center;"><?php echo $value['mileage_fee']/100;?></td>
                                        <td style="text-align: center;"><?php echo $value['time_fee']/100;?></td>
                                        <td style="text-align: center;"><?php echo $value['over_time_fee']/100;?></td>
                                    </tr>
                                    <?php endforeach;?>
                                    <?php endif;?>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="8" style="font-weight: bold;color: black;">远途费规则配置</td>
                        </tr>
                        <tr>
                            <td colspan="8">
                                <table class="layui-table yuantuRuleTimeFee">
                                    <tr>
                                        <td style="text-align: center;width: 20%">起始公里数（KM）</td>
                                        <td style="text-align: center;width: 20%">终止公里数（KM）</td>
                                        <td style="text-align: center;width: 20%">里程费(元/公里)</td>
                                    </tr>
                                    <?php if(!empty($frPriceList)):?>
                                    <?php foreach($frPriceList as $key=>$value):?>
                                    <tr>
                                        <td style="text-align: center;"><?php echo $value['start_mileage']/1000;?></td>
                                        <td style="text-align: center;"><?php echo $value['end_mileage']/1000;?></td>
                                        <td style="text-align: center;"><?php echo $value['mileage_fee']/100;?></td>
                                    </tr>
                                    <?php endforeach;?>
                                    <?php endif;?>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</block>
